

<template>
<div class="personalCente">
  <navBar :title='title' :titleColor='titleColor' :backVisible='backVisible' :homePath='homePath' :visibleLeft='visibleLeft'></navBar>
  <div class="personalCenterList">
      <div class="clearfix personalCenterData">
        <p class="fl personalCenterDataLeft"> 姓名</p>
        <p class="fr personalCenterDataRight" @click="EditName">蒂芙尼<img class="fr" src="../../../../static/images/right.png"></p>
      </div>
      <div class="clearfix personalCenterData">
        <p class="fl personalCenterDataLeft" >电话</p>
        <p class="fr personalCenterDataRight" @click="EditTel">1502****920<img src="../../../../static/images/right.png"></p>
      </div>
      <div class="clearfix personalCenterData">
        <p class="fl personalCenterDataLeft">性别</p>
        <p class="fr personalCenterDataRight" @click="showPicker">{{genderName}}<img class="fr" src="../../../../static/images/right.png"></p>
      </div>
      <div class="clearfix personalCenterData" >
        <p class="fl personalCenterDataLeft">生日</p>
        <p class="fr personalCenterDataRight"> 
          <picker class="fl" mode="date"
            :value="startDate"
            :start="pickerStart" end="2217-09-01" @change="bindDateChangeStart($event)">
              <div class="index_picker">
                <div class="">{{ startDate }}</div>
              </div>
            </picker>
          <img src="../../../../static/images/right.png">
        </p>
      </div>
  </div>
  <p class="SwitchAccount">切换账号</p>
<mpvue-picker ref="mpvuePicker" :mode="mode" :pickerValueDefault="pickerValueDefault" @onChange="onChange" @onConfirm="onConfirm" @onCancel="onCancel" :pickerValueArray="pickerValueArray"></mpvue-picker>

</div>
</template>

<script>
import mpvuePicker from 'mpvue-picker';
import navBar from "@/components/navBar/index"
export default {    
  components:{
    navBar,
    mpvuePicker
  },
  data(){
    return{
        title:'设置',
        // 标题颜色
        titleColor: {
          default: "#FFFFFF"
        },
        backVisible:true,
        homePath:true,
        visibleLeft:true,

        startDate:'去设置',
        endDate:'2018-02-21',
        pickerStart:'1900-01-01',

        mode: 'selector',
      pickerValueArray: [
        {
          label: '男',
          value: 1
        },
        {
          label: '女',
          value: 2
        }
      ],
      pickerValueDefault: [1],
      genderName:'未选择',
      genderId:'',
    }
  },
  onShow(){     

  },
  onLoad(){
  },
  methods: {
    showPicker() {
      this.$refs.mpvuePicker.show();
    },
    onConfirm(e) {
      console.log(e,'onConfirm');
      this.genderName=e.label
      this.genderId=e.value[0]
    },
    onChange(e) {
      console.log(e,'onChange');
    },
    onCancel(e) {
      console.log(e,'onCancel');
    },
    bindDateChangeStart(e){
      this.startDate=e.mp.detail.value
    },
    EditName(){
       wx.navigateTo({
        url:"/pages/personalCenter/EditName/main"
      })
    },
    EditTel(){
      wx.navigateTo({
        url:"/pages/personalCenter/EditTel/main"
      })
    }
  
    
  }
}
</script>

<style scoped>
.personalCente{
  width: 100%;
  height: 100vh;
  background: #fff;
}

.personalCenterList{
  width: 100%;
  padding: 0px 15px;
  box-sizing: border-box;
  background: #fff;

}
.personalCenterData{
  width: 100%;
  padding: 15px 0px;
  /* border-bottom: 1px solid #EBEBEB; */
}
.personalCenterData:last-child{
  border-bottom: none;
}
.personalCenterDataLeft{
  font-size:15px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(51,51,51,1);
}
.personalCenterDataLeft img{
  width: 16px;
  height: 16px;
  margin-right: 8px;
}
.personalCenterDataRight{
  font-size:12px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(179,179,179,1);
}
.personalCenterDataRight img{
  width: 20px;
  height: 20px;
  margin-left: 6px;
}
.SwitchAccount{
  font-size:16px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(204,170,126,1);
line-height:22px;
margin-top: 20px;
text-align: center
}
</style>
